.expense-add {
  width: 100%;
  min-height: 100vh;
  // background: #FFFFFF;
  overflow-x: hidden;
  padding-bottom: 180px; // 为底部按钮预留空间
}

// 顶部导航区域背景
.header-wrapper {
  width: 100%;
  background: #3F99F9;
  border-radius: 0px 0px 0px 0px;
  position: relative;
  margin: 0 auto;

  // 下方20px背景色
  // &::after {
  //   content: '';
  //   position: absolute;
  //   bottom: -20px;
  //   left: 0;
  //   right: 0;
  //   width: 100%;
  //   height: 20px;
  //   background: #F8F8F8;
  //   z-index: 1;
  // }
}

// 顶部导航
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 40px 20px 20px;
  background: transparent;
  position: relative;

  .back-icon {
    width: 60px;
    height: 60px;
    font-size: 60px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 324px;
    height: 54px;
    font-family: 'Source Han Sans CN', 'Source Han Sans CN';
    font-weight: 500;
    font-size: 32px;
    color: #FFFFFF;
    text-align: center;
    font-style: normal;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 确保页面完全覆盖全局背景
body {
  background: #FFFFFF !important;
}

// 防止任何header-wrapper样式影响
// .header-wrapper {
//   display: none !important;
// }

// 表单容器
.form-container {
  position: relative;
 margin-top: 30px;
  // 全局van-field样式
  .van-field {
    text-align: left !important;
    direction: ltr !important;

    .van-field__control {
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 32px;
      color: #999999;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }

    // 为字段的van-field__value添加底部内边距
    .van-field__value {
      padding-bottom: 6px;
    }
  }

  .expense-detail-title {
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-weight: 400;
    font-size: 24px;
    color: #ACACAC;
    text-align: left;
    font-style: normal;
    text-transform: none;
    padding-left: 30px;
    padding-top: 18px;
    padding-bottom: 16px;
    background: #F8F8F8;
    margin: 0;
  }

  .form-section-title {
    background: #f8f8f8;
    padding: 14px 15px 14px 30px;
    margin: 0;
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-weight: 400;
    font-size: 24px;
    color: #999999;
    text-align: left;
    font-style: normal;
    text-transform: none;
  }

  .form-field {
    // margin-bottom: 20px; // 增加底部间距
    padding: 20px 20px 20px 30px;
  
    background: #FFFFFF;
    position: relative;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);

    // 为第一个字段的van-field__value添加底部内边距
    &:first-child .van-field__value {
      padding-bottom: 6px;
    }

    // 在第一个表单字段前添加#F8F8F8背景间距


    // 在每个表单字段后添加#F8F8F8背景间距


    .field-label {
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 32px;
      color: #333333;
      padding-bottom: 10px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }

    .custom-field {
      padding: 0;
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 32px;
      color: #999999;
      text-align: left;
      font-style: normal;
      text-transform: none;

      .van-field__control {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 32px;
        color: #999999;
        text-align: left;
        font-style: normal;
        text-transform: none;

        &::placeholder {
          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: 400;
          font-size: 32px;
          color: #999999;
          text-align: left !important;
          font-style: normal;
          text-transform: none;
        }
      }
    }

    &.textarea-field {
      border-bottom: none !important;

      .custom-field {
        padding: 12px 0;

        .van-field__control {
          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: 400;
          font-size: 14px;
          color: #333333;
          text-align: left !important;
          direction: ltr !important;
          font-style: normal;
          text-transform: none;
          min-height: 60px;
          resize: none;

          &::placeholder {
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: 400;
            font-size: 14px;
            color: #999999;
            text-align: left !important;
            direction: ltr !important;
            font-style: normal;
            text-transform: none;
          }
        }

        // 字符计数样式
        .van-field__word-limit {
          font-size: 12px;
          color: #999999;
          text-align: right;
          margin-top: 4px;
        }
      }
    }

    // 报销金额特殊样式
    &.amount-field {
      padding: 20px 20px 20px 30px;
      box-sizing: border-box;
      border-bottom: none !important;
      position: relative;

      // 上方30px背景色
      // &::before {
      //   content: '';
      //   position: absolute;
      //   top: -30px;
      //   left: 0;
      //   right: 0;
      //   width: 100%;
      //   height: 30px;
      //   background: #F8F8F8 !important;
      //   z-index: -1;
      //   border: none !important;
      //   outline: none !important;
      //   box-shadow: none !important;
      //   border-radius: 0 !important;
      //   margin: 0 !important;
      //   padding: 0 !important;
      //   display: block !important;
      //   visibility: visible !important;
      //   opacity: 1 !important;
      //   transform: none !important;
      //   filter: none !important;
      //   backdrop-filter: none !important;
      //   -webkit-appearance: none !important;
      //   appearance: none !important;
      //   overflow: hidden !important;
      // }

      .amount-container {
        background: #E0EFFE;
        border-radius: 10px;
        box-sizing: border-box;
        padding: 25px 42px 20px 30px;
        display: flex;
        align-items: flex-end;

        // justify-content: flex-start;
        justify-content: space-between;
        // margin-top: 20px;
        // flex-direction: column;
        // position: relative;

        .amount-container-label {

          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: 400;
          font-size: 28px;
          color: #666666;
          text-align: left;
          font-style: normal;
          text-transform: none;
        }

        .amount-display {
          // flex: 1;

          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: bold;
          font-size: 40px;
          color: #FF5219;
          text-align: left;
          font-style: normal;
          text-transform: none;
        }

        .amount-input {
          flex: 1;
          background: transparent;
          padding: 0;

          .van-field__control {
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: 600;
            font-size: 36px;
            color: #333333;
            text-align: left;
            font-style: normal;
            text-transform: none;

            &::placeholder {
              font-family: Source Han Sans CN, Source Han Sans CN;
              font-weight: 600;
              font-size: 36px;
              color: #999999;
              text-align: left !important;
              font-style: normal;
              text-transform: none;
            }
          }
        }

        .amount-icon {
          width: 94px;
          height: 101px;
          // margin-left: 16px;

          // flex-shrink: 0;
          // position: absolute;
          // right: 20px;
        }
      }
    }

    .select-field {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      cursor: pointer;

      .select-value {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 32px;
        color: #999999;
        text-align: left;
        font-style: normal;
        text-transform: none;

        &.placeholder {
          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: 400;
          font-size: 32px;
          color: #999999;
          text-align: left !important;
          font-style: normal;
          text-transform: none;
        }
      }

      .select-arrow {
        font-size: 32px;
        color: #999999;
        margin-left: 8px;
        flex-shrink: 0;
      }
    }
  }

  .character-count {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 16px;

    .count-text {
      font-size: 12px;
      color: #999;
    }
  }
}

.opacity-label {
  span {
    &.placeholder {
      opacity: 0.5 !important;
    }
  }
}

// 流程步骤样式
.process-step-container {
  background: #fff;
  padding: 18px 20px 0px 30px;
  position: relative;
  margin: 20px 0;

  // // 上方20px背景色
  // &::before {
  //   content: '';
  //   position: absolute;
  //   top: -20px;
  //   left: 0;
  //   right: 0;
  //   height: 20px;
  //   background: #F8F8F8;
  // }

  // 下方20px背景色
  // &::after {
  //   content: '';
  //   position: absolute;
  //   bottom: -20px;
  //   left: 0;
  //   right: 0;
  //   height: 20px;
  //   background: #F8F8F8;
  // }
}

.process-step-title {
  font-family: Source Han Sans CN, Source Han Sans CN;
  font-weight: bold;
  font-size: 32px;
  color: #333333;
  text-align: left;
  font-style: normal;
  text-transform: none;
  padding-top: 18px;
  padding-bottom: 18px;
}

.process-steps {
  .process-step {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-top: 24px;

    &.is-last {
      padding-bottom: 22px;
    }
  }

  .step-line-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
    margin-top: 2px; // 向下调整2px与标题对齐

    .step-dot {
      width: 15px;
      height: 15px;
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid rgba(0, 0, 0, 0.1);
      border-radius: 50%;
    }

    .step-line {
      width: 2px;
      height: 100px;
      background: rgba(0, 0, 0, 0.1);
      margin-top: 8px;
    }
  }

  .step-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    .step-title-container {
      margin-top: -4px; // 向上调整4px与步骤线对齐
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 26px;
      color: #999999;
      text-align: left;
      font-style: normal;
      text-transform: none;
      gap: 2px;
    }

    .step-title {
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 32px;
      color: #333333;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }

    .step-subtitle {
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 26px;
      color: #999999;
      text-align: left;
      font-style: normal;
      text-transform: none;
      margin-top: 5px;
    }

    .step-person {
      display: flex;
      flex-direction: column;
      align-items: center;

      .person-avatar {
          width: 68px;
          height: 68px;
          border-radius: 5px 5px 5px 5px;
          margin-bottom: 4px;
          margin-top: -12px;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px 5px 5px 5px;
          }

          .name-avatar {
            width: 100%;
            height: 100%;
            background-color: #3F99F9;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 5px 5px 5px 5px;
            font-size: 28px;
            font-weight: 500;
          }
        }

      .person-name {
        padding-top: 4px;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 500;
        font-size: 22px;
        color: #999999;
        text-align: center;
        font-style: normal;
        text-transform: none;
      }
    }
  }
}

// 底部操作按钮
.action-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  padding: 20px 30px 40px;
  display: flex;
  justify-content: center;
  box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;

  .action-btn {
    border-radius: 8px;
    font-weight: 400;
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 88px;


    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    // 提交按钮
    &.submit-btn {
      font-family: Source Han Sans CN, Source Han Sans CN;
      font-weight: 400;
      font-size: 36px;
      color: #FFFFFF;
      text-align: center;
      font-style: normal;
      text-transform: none;
      background-color: #2D67B0;
      border: none !important;
      width: 584px;
      height: 84px;
      border-radius: 10px;

      &:not(:disabled):active {
        background: #245A9B;
      }
    }
  }
}

// ActionSheet 样式覆盖
:deep(.van-action-sheet) {
  .van-action-sheet__header {
    font-size: 32px;
    font-weight: 600;
    color: #333333;
    padding: 30px 0;
    border-bottom: 2px solid #F5F5F5;
  }

  .van-action-sheet__item {
    font-size: 28px;
    color: #333333;
    padding: 24px 0;
    &:active {
      background-color: #F5F5F5;
    }

    &:not(:last-child) {
      border-bottom: 1px solid #F0F0F0;
    }
  }

  .van-action-sheet__cancel {
    font-size: 28px;
    color: #666666;
    padding: 24px 0;
    margin-top: 16px;
    background: #FFFFFF;
    border-radius: 16px 16px 0 0;
  }
}

// DatePicker 样式覆盖
:deep(.van-date-picker) {
  .van-picker__toolbar {
    padding: 20px 30px;
    border-bottom: 2px solid #F5F5F5;

    .van-picker__title {
      font-size: 32px;
      font-weight: 600;
      color: #333333;
    }

    .van-picker__cancel,
    .van-picker__confirm {
      font-size: 28px;
      color: #3F99F9;
      font-weight: 500;
    }
  }

  .van-picker-column__item {
    font-size: 28px;
    color: #333333;
    padding: 16px 0;

    &--selected {
      color: #3F99F9;
      font-weight: 600;
    }
  }
}

// 表单验证错误状态
:deep(.van-field--error) {
  .van-cell {
    .van-cell__title {
      color: #FF4D4F;
    }

    .van-field__control {
      color: #FF4D4F;
    }
  }
}

// 自定义字段样式
.custom-field {
  :deep(.van-field__control) {
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-weight: 400;
    font-size: 32px;
    color: #999999;
    text-align: left;
    font-style: normal;
    text-transform: none;
  }

  :deep(.van-field__right-icon) {
    color: #c8c9cc;
    font-size: 24px;
  }
}

// 日期选择器样式修复
:deep(.van-popup) {
  z-index: 9999;
}

:deep(.van-date-picker) {
  background: #fff;
  border-radius: 16px 16px 0 0;
}

:deep(.van-action-sheet) {
  z-index: 9999;

  .van-action-sheet__header {
    padding: 20px 32px;

    .van-action-sheet__title {
      font-size: 32px;
      color: #333;
      font-weight: 500;
    }
  }

  .van-action-sheet__item {
    padding: 24px 32px;
    font-size: 30px;
    color: #333;

    &:active {
      background-color: #f7f8fa;
    }
  }
}